<?php
/**
 * Sets a cookie in which the lanuage will be saved 
 */
$iLang= $_GET['lang'];
echo "$iLang";
setcookie("language", "$iLang", 0);
$url = $_SERVER['HTTP_REFERER'];
header('Location: '.$url);
?> 